{
GtkPlacesSidebar *sidebar = GTK_PLACES_SIDEBAR (user_data);
guint state;
+ double x_root, y_root;
if (sidebar->drag_row == NULL || sidebar->dragging_over)
return FALSE;
!(state & GDK_BUTTON1_MASK))
return FALSE;
+ gdk_event_get_root_coords ((GdkEvent *) event, &x_root, &y_root);
+
if (gtk_drag_check_threshold (widget,
sidebar->drag_root_x, sidebar->drag_root_y,
- event->x_root, event->y_root))
+ x_root, y_root))
{
sidebar->dragging_over = TRUE;
GtkPlacesSidebar *sidebar;
GtkPlacesSidebarSectionType section_type;
gdouble x, y;
+ double x_root, y_root;
g_object_get (GTK_SIDEBAR_ROW (row),
"sidebar", &sidebar,
if (section_type == SECTION_BOOKMARKS)
{
gdk_event_get_coords ((GdkEvent *) event, &x, &y);
+ gdk_event_get_root_coords ((GdkEvent *) event, &x_root, &y_root);
sidebar->drag_row = GTK_WIDGET (row);
sidebar->drag_row_x = (gint)x;
sidebar->drag_row_y = (gint)y;
- sidebar->drag_root_x = event->x_root;
- sidebar->drag_root_y = event->y_root;
+ sidebar->drag_root_x = x_root;
+ sidebar->drag_root_y = y_root;
}
g_object_unref (sidebar);